/**
 * ConcreteNodeDescriptor.java
 * ************************** 
 * @date Mar 18, 2011
 * @author Michele Tamburini
 * 
 * **************************
 */
package gossipServices.basic.nodeDescriptors;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * Description: 
 * This is an extension of ConcreteNodeDescriptor that provides simply
 * a constructor able to set the host ip through 
 *   InetAddress.getLocalHost();
 * The GeneralNodeDescriptor(s) are ordered according to the ID sequence
 * and not according the Age. 
 *
 */
public class GeneralNodeDescriptor extends ConcreteNodeDescriptor {
		
			
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;


	public GeneralNodeDescriptor(String nodeName, InetAddress ip, int age) {
		super(nodeName, ip, age);
	}
	
	public GeneralNodeDescriptor(String nodeName){
		super(nodeName);
		try {
			this.address = InetAddress.getLocalHost();
		} catch (UnknownHostException e) {
			e.printStackTrace();
		}
	}

}
